<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "admin_node".
 *
 * @property string $id
 * @property string $name
 * @property string $controller
 * @property string $action
 * @property string $describe
 */
class Admin_node extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'admin_node';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [
             ['name','controller','action'],'required'],
             [['name', 'controller', 'action'], 'string', 'max' => 50],
            [['describe'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '权限名称',
            'controller' => '控制器',
            'action' => '方法',
            'describe' => '描述',
        ];
    }
}
